home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / SIRIUS.CMD < prev    next >
Encoding:
Text File  |  1996-02-28  |  2.2 KB  |  128 lines

  1. #     1994 (c) Sirius Connections.
  2. #    Trumpet 2.0 Script for Sirius.
  3. #    This script works both for PPP and also Slip.
  4. #    
  5. #       trace on
  6. #
  7. # set up some strings for dialling up
  8. #
  9. if ![load $number]
  10.   if [query $number "Enter your dial up phone number"]
  11.     save $number
  12.   end
  13. end
  14. if ![load $username]
  15.   if [username "Enter your login username"]
  16.     save $username
  17.   end
  18. end
  19. if ![load $password]
  20.   if [password "Enter your login password"]
  21.     save $password
  22.   end
  23. end
  24. if ![load $type]
  25.   if [query  $type "Type SL/IP or PPP case sensitive"]
  26.     save $type
  27.   end
  28. end
  29. $modemsetup = "z"
  30. $userprompt = "login:"
  31. $passprompt = "Password:"
  32. $slipcmd = "SL/IP"
  33. $addrtarg = "to"
  34. $pppcmd = "PPP"
  35.  
  36. %attempts = 10
  37. #
  38. #
  39. #----------------------------------------------------------
  40. #
  41. # initialize modem
  42. #
  43. output "atz"\13
  44. if ! [input 10 OK\n]
  45.   display "Modem is not responding"\n
  46.   abort
  47. end
  48. #
  49. # setup our modem commands
  50. #
  51. output "at"$modemsetup\13
  52. input 10 OK\n
  53. #
  54. # send phone number
  55. #
  56. %n = 0
  57. repeat
  58.   if %n = %attempts
  59.     display "Too many dial attempts"\n
  60.     abort
  61.   end
  62.   output "atdt"$number\13
  63.   %ok = [input 60 CONNECT]
  64.   %n = %n + 1
  65. until %ok
  66. input 10 \n
  67. #
  68. #  wait till it's safe to send because some modem's hang up
  69. #  if you transmit during the connection phase
  70. #
  71. wait 30 dcd
  72. #
  73. # now prod the terminal server
  74. #
  75. # Next line is commented out by Arman
  76. # output \13
  77. #
  78. #  wait for the username prompt
  79. #
  80. input 30 $userprompt
  81. output $username\13
  82. #
  83. # and the password
  84. #
  85. input 30 $passprompt
  86. output $password\13
  87. #
  88. # we are now logged in
  89. #
  90. display "Entered passwd ready to SLIP or PPP "
  91. input 30 $type 
  92. if $type = $pppcmd  
  93.   #
  94.   # jump into ppp mode
  95.   #
  96.   #output $pppcmd\13
  97.   #
  98. display "We are in PPP  "
  99.  
  100.   input 30 $addrtarg
  101.   #
  102.   address 30
  103.   display "PPP mode selected.  Will try to negotiate IP address."\n
  104.   #
  105. else
  106.   #
  107.   # jump into slip mode
  108.   #
  109.   # output $slipcmd\13
  110.   #
  111.   # wait for the address string
  112.   #
  113. display "We are in SLIP  "
  114.   input 30 $addrtarg
  115.   #
  116.   # parse address
  117.   #
  118.   address 30
  119.   # input 30 \n
  120.   #
  121.   # we are now connected, logged in and in slip mode.
  122.   #
  123.    display \n
  124.    display Connected.  Your IP address is \i.\n
  125. end
  126. #
  127. # now we are finished.
  128. #